using System;
using Me.Prettyprint.Cassandra.Connection.Client;
using Me.Prettyprint.Cassandra.Service;
using Me.Prettyprint.Hector.Api.Exceptions;

namespace Me.Prettyprint.Cassandra.Connection
{
	/// <summary>
	/// The primary methods implementors have to focus on is BorrowClient,
    /// ReleaseClient and Shutdown. BorrowClient should return a connection
    /// to a node in the Cassandra ring. ReleaeClient should put the connection
    /// back in the correct pool. Shutdown should gracefully close all the
    /// connections to the nodes.
	/// </summary>
	public interface HClientPool:PoolMetric
	{
        CassandraHost CassandraHost
        {
            get;
        }
        int NumBeforeExhausted
        {
            get;
        }
        bool Exhausted
        {
            get;
        }
        int MaxActive
        {
            get;
        }
		string StatusAsString
		{
			get;
		}
		
		HClient BorrowClient();
		void  ReleaseClient(HClient client);
		void  Shutdown();
	}
}